<?
/*导览页面，按照分类分别列出不同的数据*/
/*调用的时候传递景点的nid即可，获取所有导览的子分类，用来区分?term_nid=xxxxx即可**/
/*输出二位数组参考*/

include_once("base.php");

$_place_term_nid=$_REQUEST['nid'];
//$_place_term_nid=26;
$_relation_list=select_lines_items($table_prefix."relation","nid desc","detail_nid","term_nid = '".$_place_term_nid."' ","");
$list = [];
for($i=0;$i<count($_relation_list);$i++){
    $nid = $_relation_list[$i][detail_nid];
    $daolan_detail_list=select_lines_all_items($table_prefix."detail","nid desc","nid = '".$nid."'and hotsale = 1 ","");
    $num = $daolan_detail_list[0][hotsale];
    if($num == 1){
        $list = array_merge_recursive($list,$daolan_detail_list);
    }
};
$result=$list;
echo out("success",0,$result);
?>